export default function(app) {
  app.service('paFetchService', paFetchService);

  function paFetchService($http) {
    'ngInject';

    // 获取建设单位列表接口
    this.getOrgList = () => {
      return $http
        .post(`${SERVER_CONTEXT}/api/organization/queryOrgs`)
        .then((resp) => {
          return resp;
        })
    }

    // 获取标段列表接口
    this.getSectionList = () => {
      return $http
        .post(`${SERVER_CONTEXT}/api/organization/queryBids`)
        .then((resp) => {
          return resp;
        })
    }

    // 获取建设单位 => 施工队 二级联动接口
    this.getTeamWithOrgList = () => {
      return $http
        .post(`${SERVER_CONTEXT}/api/organization/queryOrgRelatives`)
        .then((resp) => {
          return resp;
        })
    }
  }
}